import { Map } from 'immutable'
import { LOADDATA } from './actionTypes'

const defaultState = Map({
  list: []
})

const reducer = (state = defaultState, action) => {
  switch(action.type) {
    case LOADDATA:
      return state.set('list', action.list)
    default:
      return state
  }
}

export default reducer